package com.devmindset.legoframework.usage.client.component;

import com.devmindset.legoframework.client.mvc.LegoComponent;
import com.devmindset.legoframework.client.mvc.LegoModel;
import com.devmindset.legoframework.client.mvc.metadata.ComponentStory;
import com.devmindset.legoframework.client.mvc.metadata.Stories;
import com.devmindset.legoframework.usage.client.event.Events;
import com.devmindset.legoframework.usage.client.text.UsageTexts;
import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.HTMLFlow;

public class FooterComponent extends LegoComponent {
	
	/** {@inheritDoc} */
	@Override
	public Canvas construct(LegoModel model) {
		HTMLFlow text = new HTMLFlow("<center>" + UsageTexts.get().footer() + "</center>");
		text.setWidth100();
		text.setHeight100();
		text.setStyleName("topPadding2px");
		return text;
	}
	
	/** {@inheritDoc} */
	@Override
	public void calculate(LegoModel model) {
		//nothing to additionally calculate for this component
	}

	/** {@inheritDoc} */
	public ComponentStory myStory() {
		return Stories.component()
			.constructedBy(Events.RENDER_FOOTER_COMPONENT)
			.knownAs("Footer Component");
	}

}